package com.example.haojiutao.mapper;

import com.example.haojiutao.common.Result;
import com.example.haojiutao.model.domain.Message;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Description: 消息控制层
 * @Author: wang_meiying
 * @CreateTime: 2024/1/22 19:25
 */
@Mapper
public interface MessageMapper {
    /*
     * @Description: 接受消息
     * @Author: wang_meiying
     * @CreateTime: 2024/1/22 19:25
     * @param: message
     * @return: com.example.haojiutao.common.Result
     **/
    int insertMessage(Message message);


    /*
     * @Description: 删除消息
     * @Author: wang_meiying
     * @CreateTime: 2024/1/22 19:26
     * @param: id
     * @return: int
     **/
    int deleteMessage(int id);

    /*
     * @Description: 查看消息
     * @Author: wang_meiying
     * @CreateTime: 2024/1/22 19:27
     * @param: message
     * @return: com.example.haojiutao.common.Result
     **/
    List<Message> selectMessage();

    /*
     * @Description: 根据用户id查看消息
     * @Author: wang_meiying
     * @CreateTime: 2024/1/22 19:28
     * @param: message
     * @return: com.example.haojiutao.common.Result
     **/
    int selectByUserId();
}
